<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/tabs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<script language="JavaScript" type="text/javascript"
	src="${ctx}/scripts/div/common.js"></script>
	
	<script type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/ajaxException.js"></script>
<%@ include file="/commons/commonList.jsp"%>

	
<style type="text/css">
<!--
body {
	background-image: url(${ctx}/images/bg.gif);
}
-->
</style>
<script type="text/javascript">

   function submitSearch(){
    var str = document.getElementById("houseNum").value;
       str = str.replace(/[ ]/g,""); //替换所有
		   if(str==''){
		   return false;
		   }
   hiddenMenu();
   document.searchHouseCharge.submit();
   }

   function submitResearch(){
		
	   if(event.keyCode==13){
	   var str = document.getElementById("houseNum").value;
       str = str.replace(/[ ]/g,""); //替换所有
		   if(str==''){
		   event.keyCode=0;
		   event.returnValue = false;
		   return false;
		   }
        hiddenMenu();
        document.searchHouseCharge.submit();
		}

   }

   function submitResearch1(){
		
	   if(event.keyCode==13){
		   submitSearch1();
		}

   }

   function openHistoryAccount(){
       var iframe=findFrame("houseMainLineList");
       iframe.openHistoryAccount();
   }

   function showMenu(){
      if(document.getElementById("HistoryAccount")!=null){
	      document.getElementById("HistoryAccount").style.display="";
	  }
   }

   function hiddenMenu(){

     if(document.getElementById("HistoryAccount")!=null){
     document.getElementById("HistoryAccount").style.display="none";
     }
   }

   function submitSearch1(){
		document.getElementById('search1').action= "${ctx}/customer_customerAction.do?method=search&isHouseMainLine=1";
		document.getElementById('search1').submit();
		//reLoadIFrameListWithQuery();
	}

	function houseDetail(houseNumber){
		houseNumber = houseNumber.split(",")[0];
		var url = "${ctx}/houseMainLin_houseMainLineAction.do?method=getResearchList";

		//sweattableDev('buidingMessage','houseList');
			con_tabPanelshowDiv('onlyHouseSeasch', 'onlyHouseSeaschRight', url + '&houseNum=' + houseNumber, '', '');
			sweattableDev('buidingMessage','houseList');
			con_tabPaneloldID='buidingMessage';
			document.getElementById('houseNum').value = houseNumber;

		//document.getElementById('houseMainLineList').src = url + '&houseNumber=' + houseNumber;

		
	}


</script>

</head>

<body>

<div style="height:530px;overflow:auto;">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"> <span class="window_head_intext">房间详细资料</span></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
</table>
<!-- 基本信息 -->
<div id="customerSearch" style="display:none;">
<table border="0" cellpadding="0" cellspacing="0" >
	  <form action="" id="search1" method="post" target="houseMainLineList">
        <tr>
		  <td class="grid align_left">房号：<input name="houseNumber" id="houseNumber" autocomplete="off" type="text" onKeyPress="submitResearch1();" class="inputtext" size="16"></td>
		  <td class="grid align_left">姓名：<input name="customerName" autocomplete="off" type="text" onKeyPress="submitResearch1();" class="inputtext" size="16"></td>
		  <td class="grid align_left">电话：<input name="telephone" autocomplete="off" onKeyPress="submitResearch1();" type="text" class="inputtext" size="16"></td>
		  <td class="grid align_left">
		  	<table border="0" cellpadding="0" cellspacing="0">
            	<tr>
              	<td class="buttonOffLeft" id="btn1_21"></td>
              	<td class="buttonOffMiddle" id="btn1_22" onblur="btn_change(2)" onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)" onclick="submitSearch1()"><img src="${ctx}/images/ico_searchico.gif" alt="" border="0" align="absmiddle"> 查询</td>
      	        <td class="buttonOffRight" id="btn1_23"></td>
				</tr>
          	</table>
          </td>
        </tr>
        </form>
      </table>
</div>
<!-- 全部信息 -->
<div id="onlyHouseSeasch" style="display:none;">
<table width="35%" border="0" cellpadding="0" cellspacing="0">
	  <form action="${ctx}/houseMainLin_houseMainLineAction.do?method=getResearchList" id="searchHouseCharge" name="searchHouseCharge" method="post" target="houseMainLineList">
        <tr>
		  <td class="grid align_left">房号：</td>
		  <td class="grid align_left"><input name="houseNum" id="houseNum" autocomplete="off" type="text" maxLength="36" class="inputtext" size="16"  onKeyPress="submitResearch();"></td>
		  <td class="grid align_left">
		  	<table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_11"></td>
              <td class="buttonOffMiddle" id="btn1_12" onblur="btn_change(1)" onMouseOver="btn_change_over(1)" onMouseOut="btn_change_out(1)" onclick="submitSearch()"><img src="${ctx}/images/ico_searchico.gif" alt="" border="0" align="absmiddle"> 查询</td>
              <td class="buttonOffRight" id="btn1_13"></td>
            </tr>
          </table>
          </td>
        </tr>
        </form>
      </table>

</div>

<div  id="onlyHouseSeaschRight" style="display:none;">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bg_toolBar2" id="MenuItemfor">
        <tr>
          <td align="right">
              <table border="0" cellpadding="0" cellspacing="0" >
                <tr>
                <td class="toolbarico" id="HistoryAccount" style="display:none"><a href="#" onClick="openHistoryAccount();" onFocus="this.blur()"><img src="${ctx}/images/charge_zhanghu.gif" border="0" align="absbottom"/>&nbsp;历史记录</a>
                </td>

                </tr>
            </table></td>
        </tr>
   </table>
</div>

<pms:tabPanel panelId="con_tabPanel"
            iframeId="houseMainLineList"
            defaultHeight="450px"
            barWidthLeft="50%"
            barWidthRight="50%">
<pms:tab tabId="houseList"
        caption="基本信息"
        baseUrl="${ctx}/customer_customerAction.do?method=initCustomerList&isHouseMainLine=1"    
        topDiv="customerSearch"
        />

 <pms:tab tabId="buidingMessage"
        caption="全部信息"
        baseUrl="${ctx}/houseMainLin_houseMainLineAction.do?method=getResearchList"
        rightDiv="onlyHouseSeaschRight"
        topDiv="onlyHouseSeasch"/>


</pms:tabPanel>
				
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" valign="top">
<tr>
    <td class="window_footer"><table border="0" cellpadding="0" cellspacing="0">
        <tr>
		<td><table border="0" cellpadding="0" cellspacing="0" onClick="windowClose();">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onblur="btn_change(3)" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)"><img src="${ctx}/images/ico_cancel.gif" border="0" align="absmiddle" /> 关 闭</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <p>&nbsp;</p></td>
  </tr>
</table>


  </body>

</html>